Secondary side constant voltage and constant current controller

ABSTRACT

A low-cost integrated circuit is used as a secondary side constant voltage and constant current controller. The integrated circuit has four terminals and two amplifier circuits. A first amplifier circuit is used to sense a voltage on a FB terminal and in response to cause a first current to flow through an OPTO terminal. A second amplifier circuit is used to sense a voltage between a SENSE terminal and a SOURCE terminal and in response to cause a second current to flow through the same OPTO terminal. The FB terminal is used for output voltage feedback and is also used to supply power onto the integrated circuit. The SOURCE terminal is used for output current feedback and is also used as power supply return for the integrated circuit. The cost of the integrated circuit is reduced by having only four terminals.

TECHNICAL FIELD

The disclosed embodiments relate to the field of power conversion, morespecifically, to switch mode power supply circuits that regulate outputvoltage and current.

BACKGROUND INFORMATION

A circuit known as a flyback converter is a switch mode power supplycircuit commonly used in applications such as AC-to-DC wall adapterpower supplies and battery chargers. FIG. 1 (Prior Art) is a blockdiagram of a simple flyback converter 1. Flyback converter 1 operates byrepeatedly closing and opening a switch 2. Closing switch 2 causes acurrent 3 to flow from a first input node 4, through a primary 5 of atransformer 6, through the switch 2, and to a second input node 7. Inone example, a rough DC voltage is present between the first and secondinput nodes 4 and 7. An alternating current (AC) line voltage may, forexample, be rectified by a full wave bridge rectifier (not shown) and anassociated smoothing capacitor (not shown) so that the rectified andsmoothed rough DC voltage is present between the first and second inputnodes 4 and 7.

When switch 2 is closed, the current 3 that flows through primary 5causes energy to be stored in transformer 6. Switch 2 is then opened.When switch 2 is opened, energy stored in transformer 6 is transferredto the output of converter 1 in the form of a pulse of current 8 thatflows through a secondary 9 of transformer 6 and through a diode 10. InFIG. 1, an output capacitor 11 is connected across output terminals 12and 13 of the converter. The pulse of current 8 charges capacitor 11. Insteady state operation in a constant voltage mode, switch 2 is switchedto open and close rapidly and in such a manner that the output voltageVOUT on output capacitor 11 remains substantially constant.

Flyback converter 1 of FIG. 1 is considered in further detail. Flybackconverter 1 includes a primary side 14 and a secondary side 15. Primaryside 14 includes a primary side controller integrated circuit 16, theswitch 2, and the primary 5 of transformer 6. Secondary side 15 includesthe secondary 9 of transformer 6, an optocoupler 17, a secondary sideconstant voltage (Cv) and constant current (CC) controller integratedcircuit 18, the rectifying diode 10, the output capacitor 11, and a fewother discrete components. Secondary side controller 18 is an integratedcircuit packaged in an IC package with eight terminals.

In the constant-voltage (CV) operational mode, the output voltage VOUTacross output terminals 12 and 13 is sensed by a resistor divider. Theresistor divider includes resistor 19 and 20. The center tap 21 of theresistor divider is coupled to terminal CV− of integrated circuit 18 andwithin integrated circuit 18 to a non-inverting input lead of a voltagecontrol amplifier 22. The voltage control amplifier 22 compares thevoltage on the center tap of the divider input to a reference voltageVREF and outputs the result of the comparison onto terminal OUT1 ofintegrated circuit 18. If the result of the comparison causes thevoltage on terminal OUT1 to be low, then a current 23 is pulled throughthe optocoupler 17. The current 23 flows through current limitingresistor 24, through optocoupler 17, through a blocking diode 25, andinto terminal OUT1. When current 23 flows through optocoupler 17, theoptocoupler 17 causes a corresponding current 26 to flow to the primaryside controller 16. This current 26 is an error current that isindicative of the voltage level on output terminals 12 and 13. Primaryside controller 16 receives the error current 26 and, based on the errorcurrent, controls the on/off duty cycle of switch 2 to regulate outputvoltage VOUT.

In the constant-current (CC) operational mode, the current beingsupplied by the power supply is sensed when it returns to secondary 9.The current, referred to as IOUT, is made to flow through a senseresistor 27. The voltage drop across sense resistor 27 is thereforeindicative of the magnitude of the current IOUT. The voltage drop acrosssense resistor 27 is sensed by a constant current amplifier 28 withinintegrated circuit 18. If the voltage drop is greater than apredetermined value, then constant current amplifier 28 causes thevoltage on terminal OUT2 to be low. If the voltage on terminal OUT2 islow, then a current 29 is pulled through current limiting resistor 24,optocoupler 17, and blocking diode 30. The current flow 29 throughoptocoupler 17 causes error current 26 to flow into primary sidecontroller 16. Error current 26 is therefore indicative of the magnitudeof the current IOUT. Based on error current 26, primary side controller16 controls the on/off duty cycle of switch 2 to regulate output currentIOUT. Flyback converter 1 either operates in the constant voltage modeor in the constant current mode, depending on the loading condition. Inone example, if the IOUT output current through output terminals 12 and13 would exceed a specified current, then converter 1 operates in theconstant current mode, otherwise converter 1 operates in the constantvoltage mode.

Secondary side controller integrated circuit 18 has eight terminals.There are two terminals CV− and CV+ for inputs to the constant voltageamplifier 22, and one terminal OUT1 for the output of the constantvoltage amplifier 22. There are two terminals CC− and CC+ for inputs tothe constant current amplifier 28, and one terminal OUT2 for the outputof the constant current amplifier 28. The integrated circuit is poweredvia a power terminal VCC and is grounded via a ground terminal GND.Integrated circuit 18 has eight terminals.

There are numerous secondary side CV-CC controller integrated circuitson the market. FIG. 2 (Prior Art) is a block diagram of a flybackconverter 51 that employs one such conventional secondary side CV-CCcontroller integrated circuit 52, the TSM1011 manufactured bySTMicroelectronics. The illustration of the circuitry within integratedcircuit 52 is based on assumptions, and is a simplification. Foraccurate detailed information, contact STMicroelectronics.

The circuit of FIG. 2 has a similar topology to the circuit of FIG. 1,except that the current sinking outputs of the two amplifiers 53 and 54are both coupled to the same output terminal OPTO 55. This makes anORing function which ensures that whenever the current or the voltageexceeds their respective CC and CV regulation values, IREG and VREG, theoptocoupler 56 will be activated. Accordingly, if amplifier 53 senses anovervoltage condition, i.e., VOUT>VREG, then amplifier 53 sinks currentinto terminal 55, thereby pulling an error current through optocoupler56 and generating an associated error current 57 back to the primaryside controller 58. If amplifier 54 senses an overcurrent condition,i.e., IOUT>IREG, then amplifier 54 sinks an error current into terminal55, thereby pulling an error current through optocoupler 56 andgenerating an associated error current 57 back to the primary sidecontroller 58. Integrated circuit 52 is powered via VCC terminal 59 andhas six terminals: VCC, GND, VCTL, ICTL, and OPTO. Although the circuitof FIG. 2 works well, further improvements and cost reductions aredesired.

SUMMARY

A low-cost integrated circuit is used as a secondary side constantvoltage and constant current controller. The secondary side constantvoltage and constant current controller may, for example, be thesecondary side controller in a wall adapter power supply or in a batterycharger. The wall adapter power supply or battery charger supplies anoutput voltage VOUT onto output terminals. The output voltage VOUT isregulated in a constant voltage mode of operation. The wall adapterpower supply or battery charger supplies an output current IOUT to aload connected to the output terminals. The output current IOUT isregulated in a constant current mode of operation. In one example, walladapter power supply or battery charger operates in the constant voltagemode unless the output current IOUT exceeds a predetermined currentregulation value, in which case the wall adapter power supply or batterycharger operates in the constant current mode.

The secondary side controller integrated circuit is packaged in apackage that has four terminals. A first amplifier circuit of theintegrated circuit is used to regulate constant output voltage. Thefirst amplifier circuit senses the voltage on a feedback (FB) terminaland in response to detecting a voltage on FB which is greater than apredetermined regulated FB voltage, an overvoltage, the first amplifiercircuit causes a first error current to be sinked into an OPTO terminal.This first amplifier is operational in the constant voltage mode ofoperation. A second amplifier circuit of the integrated circuit is usedto regulate constant output current. The second amplifier circuit sensesa voltage between a SENSE terminal and a SOURCE terminal, which isindicative of the magnitude of the output current IOUT of the powersupply or battery charger because a sense resistor is connected acrossthese two terminals. The sense resistor is in the return path of theoutput current IOUT. In response to detecting a voltage between theSENSE and SOURCE terminals which is greater than a predeterminedthreshold voltage, the second amplifier circuit causes a second errorcurrent to be sinked into the OPTO terminal. This second amplifier isoperational in the constant current mode of operation.

In one advantageous aspect, the FB terminal is used to sense themagnitude of the output voltage VOUT and is also used to receive supplycurrent into the integrated circuit. In another advantageous aspect, theSOURCE terminal is used to sense the magnitude of the output currentIOUT and is also used as power supply current return for the integratedcircuit. Furthermore, the first amplifier circuit and the second erroramplifier circuit share the same OPTO terminal as their common currentsink output. The cost of the integrated circuit is reduced by havingonly four terminals: FB, OPTO, SENSE and SOURCE.

Other embodiments and advantages are described in the detaileddescription below. This summary does not purport to define theinvention. The invention is defined by the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, where like numerals indicate like components,illustrate embodiments of the invention.

FIG. 1 (Prior Art) is a block diagram of a secondary side controlledflyback converter using a conventional constant voltage and constantcurrent controller that has eight terminals.

FIG. 2 (Prior Art) is a block diagram of a secondary side controlledflyback converter using a conventional constant voltage and constantcurrent controller that has six terminals.

FIG. 3 is a block diagram of a novel secondary side controlled flybackconverter 100 in accordance with one novel aspect.

FIG. 4 is a detailed block diagram of a novel secondary side constantvoltage and constant current controller 303 of the flyback converter 100of FIG. 3.

FIG. 5 is a diagram of a idealized VOUT-IOUT curve for the flybackconverter of FIG. 3 when the flyback converter is used to charge adischarged battery.

DETAILED DESCRIPTION

Reference will now be made in detail to some embodiments of theinvention, examples of which are illustrated in the accompanyingdrawings.

FIG. 3 is a block diagram of a secondary side controlled flybackconverter 100 in accordance with one novel aspect. Flyback converter 100includes a primary side 200 and a secondary side 300. Primary side 200includes a primary side controller integrated circuit 201, a primaryside main switch 202, a primary 203 of a transformer 204, a full waveRectifier Bridge 205, and an input capacitor 206. Secondary side 300includes a secondary 301 of transformer 204, an optocoupler 302, a novelsecondary side constant voltage and constant current controllerintegrated circuit 303, a secondary side rectifier 304, and an outputcapacitor 305. Secondary side 300 also includes a feedback voltagedivider network 306 formed by resistors 307 and 308, a sense resistor310, and a resistor 311 to limit current through optocoupler 302.Secondary side constant voltage and constant current controller 303includes a voltage control amplifier circuit 312 and a current controlamplifier circuit 313. Capacitor-resistor network 315/316 is acompensation network for amplifier circuit 312, and capacitor-resistornetwork 317/318 is a compensation network for amplifier circuit 313.

In operation, an alternating current (AC) line voltage, for example 110volts AC, is received onto primary input terminals 207 and 208. Thisline input voltage is represented by AC voltage source symbol 209. Theline input voltage signal is full wave rectified by Rectifier Bridge 205and the resulting rectified signal is smoothed by input capacitor 206.For purposes of explanation here, what is referred to as a rough DCvoltage is therefore present across input capacitor 206.

When primary side main switch 202 is conductive (i.e., on), a current210 is drawn from one plate of capacitor 206, through primary 203 oftransformer 204, and through switch 202 to node 211 and the other plateof capacitor 206. This current flow causes energy to be stored intransformer 204. When primary side main switch 202 is turned off, energyis transferred into secondary 301 to the output of the converter in theform of a pulse of current 314. Current 314 places charge into outputcapacitor 305 and raises the voltage on output capacitor 305. Primaryside controller 201 repeatedly switches switch 202 on and off andcontrols the on/off duty cycle of switch 202 such that either an outputvoltage VOUT on capacitor 305 or an output current IOUT flowing out ofthe converter is regulated. Output current IOUT is illustrated flowingthrough an external load 324.

Load 324 may, for example, be a rechargeable battery that is beingcharged. Which one of the output voltage VOUT or the output current IOUTis regulated depends on the operating mode of converter 100. Ifconverter 100 is operating in a constant voltage (CV) mode, then VOUT isregulated to have a maximum regulated voltage value VREG (for example,five volts). If, on the other hand, converter 100 is operating in aconstant current (CC) mode, then IOUT is regulated to output a maximumregulated current value IREG (for example, one ampere). Which modeconverter 100 operates in depends on the amount of current beingdelivered to the load. If the load demands a current that exceeds apredetermined current limit, or IREG, then converter 100 operates in theconstant current mode, otherwise converter 100 operates in the constantvoltage mode. In a battery charger application, when the battery voltageis less than VREG (the predetermined full-charge battery voltage) thecircuit will supply a regulated constant output current, IREG. As thebattery charges up to its full-charge regulation voltage, the chargecurrent will decrease and the circuit will transition from the constantcurrent (CC) mode, to the constant voltage (CV) mode.

FIG. 4 is a more detailed block diagram of the novel secondary sideconstant voltage and constant current controller integrated circuit 303of FIG. 3. Amplifier circuit 312 includes an error amplifier 403, areference voltage generator 401, an under-voltage-lock-out (UVLO)circuit 402, a shunt device 405, a resistor divider network 412 formedby resistors 410 and 411, and an N-channel field effect transistor(NFET) 420. Amplifier circuit 313 includes an error amplifier 404, alow-voltage current control (LVCC) circuit 406, a reference voltagegenerator circuit 407, and an NFET 421.

Constant Voltage Mode:

If converter 100 is operating in the constant voltage mode, then aresistor divider 306 (see FIG. 3) is used to sense the output voltageVOUT between converter output terminals 325 and 326. A fraction of VOUTis present on tap 318 of the voltage divider, and this fractionalvoltage is supplied onto the feedback terminal FB 319 of secondary sideintegrated circuit 303. As illustrated in FIG. 4, this voltage onterminal 319 is in turn voltage-divided on-chip by voltage divider 412.The center tap 422 of voltage divider 412 is coupled to thenon-inverting input lead of error amplifier 403. Resistances 307, 308,410 and 411 are selected such that if VOUT has a magnitude of thevoltage to be regulated (for example, five volts), then the voltage onthe non-inverting input lead of error amplifier 403 is at the referencevoltage VREF output by reference voltage generator 401. The output ofreference voltage generator 401 is coupled to the inverting input leadof error amplifier 403. Accordingly, if the output voltage VOUT onterminals 325 and 326 has a magnitude greater than five volts, then thevoltage on the non-inverting input lead of error amplifier 403 isgreater than the VREF voltage on the inverting input lead of erroramplifier 403. Error amplifier 403 outputs a high error signal 408 thatturns on NFET 420. NFET 420 is conductive and sinks a current 321 (seeFIG. 3) into OPTO terminal 320 of the secondary side integrated circuit303. This current 321 flows through current limiting resistor 311,through optocoupler 302, and into the OPTO terminal 320 of the secondaryside integrated circuit 303, through conductive NFET 420, and to SOURCEterminal 322. This current 321 flowing through optocoupler 302 causes acorresponding current signal 327 to flow through the optocoupler 302 andto the primary side controller 201. In response to receiving thissignal, primary side controller 201 decreases the duty cycle with whichswitch 202 is switched, or otherwise controls switch 202, such that lessenergy is transferred per unit time through transformer 204 to thesecondary side and such that the voltage on output capacitor 305 isregulated at the maximum voltage VREG.

In the constant voltage mode, VOUT can be expressed as:

VOUT=VFB*(1+RFB1/RFB2)+IFB*RFB1   (1)

where VFB is the voltage on FB terminal 319, IFB is the nominal biascurrent flow into FB terminal 319, RFB1 is the resistance of resistor307, and RFB2 is the resistance of resistor 308.

As illustrated in FIG. 4, the inverting input lead of error amplifier403 is coupled to receive VREF. The non-inverting input of erroramplifier 403 is coupled to the middle of resistor divider network 412.Error amplifier 403 senses the voltage on the non-inverting input leadand forces it to be substantially the same as the voltage on theinverting input lead. Therefore, voltage VFB can be expressed as:

VFB=VREF*(1+R1/R2)   (2)

where VREF is the reference voltage provided by reference voltagegenerator 401, R1 is the resistance of resistor 410, and R2 is theresistance of resistor 411.

In one example of CV mode operation, reference voltage generator 401 isa bandgap circuit which provides a reference voltage VREF of 1.25 volts.R1 and R2 are internally selected such that R1/R2 is equal to 2.2. RFB1and RFB2 are selected to be 1K ohm and 4 k ohms respectively. Therefore,VFB is equal to four volts according to Equation (2), and VOUT is equalto five volts according to Equation (1) assuming bias current IFB isnegligible. If VOUT is higher than five volts, then voltage VFB is alsohigher than four volts, and the voltage on the non-inverting input leadof error amplifier 403 is higher than VREF 1.25 volts. Under such acondition, error amplifier 403 outputs error signal 408 and causescurrent 321 to be sinked into OPTO terminal 320. As described above,this causes primary side controller 201 to change the on-off duty cycleof primary side main switch 202. As a result, VOUT is regulated to 5.0volts.

Constant Current Mode:

If converter 100 is operating in the constant current (CC) mode, thensense resistor 310 (see FIG. 3) is used to sense the output currentIOUT. Sense resistor 310 is in the return path of the output currentIOUT on its way back to the secondary 301. The magnitude of-the voltagedropped across sense resistor 310 is therefore indicative of themagnitude of the output current IOUT. One node of sense resistor 310 iscoupled to terminal SENSE 323 of secondary side integrated circuit 303whereas the other node of sense resistor 310 is coupled to terminalSOURCE 322 of secondary side integrated circuit 303. As illustrated inFIG. 4, terminal SENSE 323 is coupled to the non-inverting input lead oferror amplifier 404. The voltage on terminal SOURCE 322 is level shiftedby reference voltage generator 407 and is supplied to the invertinginput lead of error amplifier 404. Accordingly, if the voltage drop fromthe SENSE terminal to the SOURCE terminal is less than the referencevoltage VTH, then error amplifier 404 outputs a high signal 409 whichmakes NFET 421 conductive. The resistance RSENSE of sense resistor 310is selected such that the error amplifier 404 outputs a high signal 409when the output current IOUT exceeds the CC regulation current, IREG.NFET 421 is conductive and sinks the current 321 into the OPTO terminal320 of the secondary side integrated circuit 303. This current 321 flowsthrough current limiting resistor 311, through optocoupler 302, and intothe OPTO terminal 320 of the secondary side integrated circuit 303,through conductive NFET 421, and to SOURCE terminal 322. This current321 flowing through optocoupler 302 causes current signal 327 to flowthrough the optocoupler 302 and to the primary side controller 201. Inresponse to receiving this signal, primary side controller 201 decreasesthe duty cycle with which switch 202 is switched, or otherwise controlsswitch 202, such that less energy is transferred per unit time throughtransformer 204 to the secondary side and such that the current IOUTflowing through sense resistor 310 is regulated at IREG. In the constantcurrent mode, IOUT can be expressed as:

IOUT=VTH/RSENSE   (3)

where VTH is the threshold voltage provided by reference voltagegenerator 407, and RSENSE is the resistance of sense resistor 310.

In one example of CC mode, VTH is equal to two hundred millivolts andRSENSE is equal to two hundred milliohms. IOUT is therefore regulated tobe equal to one ampere. If IOUT is larger than one ampere, then thevoltage on the inverting input of error amplifier 404 is lower thanvoltage on the non-inverting input of error amplifier 404. Under such acondition, error amplifier 404 outputs the error signal 409 and causescurrent 321 to be sinked into OPTO terminal 320. As described above,this causes primary side controller 201 to change the on-off duty cycleof primary side main switch 202. As a result, IOUT is regulated to themaximum limit of one ampere.

Ideally, converter 100 operates such that output voltage VOUT is at aconstant output voltage VREG in constant voltage (CV) mode and such thatthe output current IOUT is at a constant output current IREG in constantcurrent (CC) mode. In the CV mode, IOUT is generally less than IREG andthe voltage across sense resistor 310 is lower than the referencevoltage (VTH) of reference voltage generator 407. As a result, NFET 421remains OFF in the CV mode. On the other hand, in the CC mode, VOUT isless than VREG and the voltage on the non-inverting input lead of erroramplifier 403 is lower than the voltage on the inverting input lead oferror amplifier 403. Error amplifier 403, if enabled, will output a lowsignal and NFET 420 will be nonconductive. Therefore, the CV mode andthe CC mode are two substantially independent operational modes and areable to share a common OPTO terminal 320. UVLO circuit 402 is providedto ensure, during power up, that error amplifier 403 is not enabledunless VOUT is high enough that error amplifier 403 will work correctly.

Terminals of Secondary Side IC:

In one advantageous aspect, FB terminal 319 is not only used to sensethe magnitude of the output voltage VOUT during constant voltage modeoperation, but FB terminal 319 is also used as a power supply terminalfor powering secondary side controller 303. FB terminal 319 is used as apower supply terminal to power reference voltage generator 401, UVLOcircuit 402, error amplifier 403, error amplifier 404, reference voltagegenerator 407, and low-voltage current control (LVCC) circuit 406. Inthe example set forth above, VFB is equal to four volts in CV regulationmode, which results in an internal power supply voltage that is higherthan the minimum internal power supply voltage that is required for thecircuitry of integrated circuit 303 to operate. Integrated circuit 303operates correctly under conditions in which VOUT is as low as 2.0 voltsand VFB is therefore 1.6 volts in this example. By using FB terminal 319for both output voltage feedback and for receiving supply power, oneless terminal is needed on the package of secondary side controller 303.The packaged secondary side controller integrated circuit 303 has onlyfour terminals: FB, OPTO, SOURCE, and SENSE.

As illustrated in Equation (1), bias current IFB contributes a smallerror to output voltage VOUT. However, IFB can be designed to berelatively small as compared to the current that flows through RFB2resistor 308. Furthermore, IFB can be designed to have a substantiallyzero temperature coefficient. In one example, IFB has a value of onehundred microamperes with a total variation of plus or minus twenty-fivemicroamperes over process, temperature and voltage. With a resistancevalue of 1K ohm for RFB1 and a voltage of five volts for VOUT, the errorcontribution to VOUT due to IFB is plus or minus twenty five millivolts(plus or minus 0.5 percent). This error is tolerable in mostapplications, including off-line chargers and power adapters.

FIG. 5 illustrates an idealized VOUT-IOUT curve for converter 100 ofFIG. 3 when the converter 100 is operating as a five watt off-line CV/CCbattery charger having a 5.0 volt CV mode output voltage and a 1.0ampere CC mode output current. VOUT_MIN is the minimal output voltage atwhich converter 100 can regulate IOUT to be constant. The point 501 onthe VOUT-IOUT curve where VOUT equals VOUT_MIN is also called a foldbackpoint. If a discharged battery represented by load 324 in FIG. 3 isconnected to converter 100 and the converter begins operation, then IOUTflowing into the discharged battery is regulated to its IREG value ofone amperes and converter 100 operates in the constant current mode. Thevoltage of the battery increases along the vertical line 502 in FIG. 5.When the battery voltage reaches the UVLO voltage, UVLO device 402enables error amplifier 403. As the battery charges up and approachesits predetermined full-charge regulation voltage, VREG, the chargecurrent decreases. When the charge current decreases below the CCregulation current, IREG, the converter 100 then enters into theconstant voltage mode and regulates the voltage VOUT across the batteryto be the VREG voltage of five volts. If, for example, VOUT_MIN is 2.0volts, then VFB_MIN is equal to 1.6 volts according to Equation (4)below. Because terminal FB 319 is used to supply power to amplifiercircuit 312 and 313, the low-voltage current control (LVCC) circuit 406is provided to ensure foldback current regulation when supply voltageVFB is low (for instance, lower than 1.6 volts).

VFB with reference to SENSE terminal 323 is given by:

VFB=(VOUT−IFB*RFB1)*RFB2/(RFB1+RFB2)   (4)

VFB with reference to SOURCE terminal 322 is given by:

VFB=(VOUT−IFB*RFB1)*RFB2/(RFB1+RFB2)+IOUT*RSENSE   (5)

Accordingly, there is slightly more operating voltage range in the CCmode than in the CV mode because secondary side controller 303 usesSOURCE terminal 322 instead of SENSE terminal 323 as its power supplyreturn. For example, if IOUT*RSENSE is equal to two hundred millivoltsin the CC mode, then VFB (with respect to SOURCE terminal 322) is twohundred millivolts higher than VFB (with respect to SENSE terminal 323).As a result, VOUT_MIN is lowered by approximately two hundredmillivolts.

Although certain specific exemplary embodiments are described above inorder to illustrate the invention, the invention is not limited to thespecific embodiments. The secondary side constant voltage and constantcurrent controller 303 described above is not limited to flyback powersupplies. It can be applied to a wide range of power supplies,converters, regulators, chargers, adapters, sources, and references.Accordingly, various modifications, adaptations, and combinations ofvarious features of the described embodiments can be practiced withoutdeparting from the scope of the invention as set forth in the claims.

1. An integrated circuit comprising: a first terminal; a secondterminal; a third terminal; a fourth terminal; a first amplifier circuitthat senses an overvoltage condition on the first terminal and inresponse causes a first current to flow through the fourth terminal; anda second amplifier circuit that senses a voltage difference between avoltage on the second terminal and a voltage on the third terminal andcauses a second current to flow through the fourth terminal if thevoltage difference is above a predetermined voltage, wherein the firstand second amplifier circuits are powered by a supply current receivedonto the integrated circuit through the first terminal.
 2. Theintegrated circuit of claim 1, wherein the overvoltage condition is acondition in which a voltage on the first terminal is greater than apredetermined voltage.
 3. The integrated circuit of claim 1, wherein theintegrated circuit is disposed in an integrated circuit package, andwherein the integrated circuit package has no more than four terminals.4. The integrated circuit of claim 1, wherein the first amplifiercircuit draws the first current through the fourth terminal by couplingthe fourth terminal to another terminal of the integrated circuit, andwherein the second amplifier circuit draws the second current throughthe fourth terminal to said another terminal of the integrated circuit.5. The integrated circuit of claim 4, wherein said another terminal isthe third terminal.
 6. The integrated circuit of claim 1, wherein thefirst amplifier circuit comprises: a first error amplifier; a voltagereference circuit, wherein the voltage reference circuit supplies areference voltage onto a first differential input lead of the firsterror amplifier; and a voltage divider network that is coupled to thefirst terminal, wherein a fraction of a voltage on the first terminal issupplied by the voltage divider network onto a second differential inputlead of the first error amplifier.
 7. The integrated circuit of claim 6,wherein the first amplifier circuit further comprises: anunder-voltage-lock-out (UVLO) circuit that disables the first erroramplifier if the voltage on the first terminal is below a UVLO thresholdvoltage.
 8. The integrated circuit of claim 6, wherein the secondamplifier circuit comprises: a second error amplifier, wherein thesecond terminal is coupled to a first differential input lead of thesecond error amplifier; and a voltage reference circuit having a firstnode and a second node, wherein the first node is coupled to the thirdterminal, wherein the second node is coupled to a second differentialinput node of the second error amplifier.
 9. A method, comprising: usinga first terminal on an integrated circuit package to sense a firstvoltage in a voltage control feedback loop, wherein the first voltage issensed by a first error amplifier that is part of an integrated circuitthat is packaged in the package; and using the first terminal to receivepower onto the integrated circuit and to power the first erroramplifier.
 10. The method of claim 9, further comprising: using a secondterminal and a third terminal on the integrated circuit package to sensea second voltage between a voltage on the second terminal and a voltageon the third terminal in a current control feedback loop, wherein thesecond voltage is sensed by a second error amplifier that is part of theintegrated circuit, wherein the first terminal is also used to power thesecond error amplifier.
 11. The method of claim 10, further comprising:using a fourth terminal on the integrated circuit package to provide acommon current sink output in the voltage control feedback loop and thecurrent control feedback loop, wherein the common current sink outputflows from the forth terminal to the third terminal, and wherein thethird terminal is also used as power supply return for the integratedcircuit.
 12. The method of claim 11, wherein the integrated circuitpackage has no more than four terminals.
 13. A power supply devicehaving a first power supply terminal and a second power supply terminal,wherein an output voltage is present between the first and second powersupply terminals, and wherein the power supply device supplies an outputcurrent through the first power supply terminal, the power supply devicecomprising: a primary side controller; an optocoupler that provides afeedback signal to the primary side controller; and a secondary sideconstant voltage and constant current controller disposed in anintegrated circuit package having no more than four terminals, whereinthe secondary side controller is part of a voltage control feedback loopthat provides feedback to the optocoupler to regulate the output voltagein a constant voltage (CV) mode, and wherein the secondary sidecontroller is part of a current control feedback loop that providesfeedback to the optocoupler to regulate the output current in constantcurrent (CC) mode.
 14. The power supply device of claim 13, wherein avoltage divider network is coupled to the first and second power supplyterminals and has a tap, wherein the voltage control feedback loopextends from the tap, through a first terminal of the integrated circuitpackage, through a first amplifier circuit of the secondary sidecontroller, through a second terminal of the integrated circuit package,through the optocoupler, and to the primary side controller.
 15. Thepower supply device of claim 14, wherein a sense resistor is coupledbetween a third terminal and a fourth terminal of the integrated circuitpackage, wherein the current control feedback loop extends from one ofthe terminals coupled to the sense resistor, through a second amplifiercircuit of the secondary side controller, through the second terminal ofthe integrated circuit package, through the optocoupler, and to theprimary side controller.
 16. The power supply device of claim 15,wherein the first and second amplifier circuits are powered by a supplycurrent received onto the integrated circuit package through the firstterminal.
 17. The power supply of claim 14, wherein the secondary sidecontroller is operable in a constant voltage (CV) mode or a constantcurrent (CC) mode.
 18. A constant voltage (CV) and constant current (CC)controller integrated circuit, comprising: a voltage control loopamplifier that causes a first current to flow through a first terminalif a voltage on a second terminal exceeds a first predetermined voltagein a constant voltage operating mode of the integrated circuit; acurrent control loop amplifier that causes a second current to flowthrough the first terminal if a voltage between a third terminal and afourth terminal exceeds a second predetermined voltage in a constantcurrent operating mode of the integrated circuit, wherein the firstterminal, second terminal, third terminal and fourth terminals areterminals of the integrated circuit; and means for powering the voltagecontrol loop amplifier and the current control loop amplifier byreceiving a supply current through the second terminal.
 19. The constantvoltage (CV) and constant current (CC) controller integrated circuit ofclaim 18, wherein the means is a connection from the second terminal toa power supply input lead of the voltage control loop amplifier and to apower supply input lead of the current control loop amplifier.
 20. Theconstant voltage (CV) and constant current (CC) controller integratedcircuit of claim 18, wherein the integrated circuit is packaged in anintegrated circuit package, and wherein the integrated circuit packagehas no more than four terminals.